package dbModels

import "time"

type JsonTime time.Time

func (j JsonTime) MarshalJSON() ([]byte, error) {
	return []byte(`"` + time.Time(j).Format("2006-01-02 15:04:05") + `"`), nil
}

type Base struct {
	Id          int64
	Uid         string `xorm:"unique notnull"`
	Description string
	Created     JsonTime `xorm:"created"`
	Updated     JsonTime `xorm:"updated"`
	Deleted     JsonTime `xorm:"deleted"`
	Version     int64    `xorm:"version"`
}
